function [result] = read6(input,dim1,dim2,dim3,dim4,dim5,dim6)

    result(dim1,dim2,dim3,dim4,dim5,dim6)=0.0;
    a=dim6*dim5*dim4*dim3*dim2;
    b=dim6*dim5*dim4*dim3;
    c=dim6*dim5*dim4;
    d=dim6*dim5;
    e=dim6;
    for h=1:dim1
        for i=1:dim2
            for j=1:dim3
                for k=1:dim4
                    for m=1:dim5
                        for n=1:dim6
                            result(h,i,j,k,m,n)=input(a*(h-1)+b*(i-1)+c*(j-1)+d*(k-1)+e*(m-1)+n);
                        end
                    end
                end
            end
        end
    end

end